package com.ms.banner.transformer;

import ohos.agp.components.Component;

public class RotateDownTransformer extends ABaseTransformer{

    @Override
    public boolean isPagingEnabled() {
        return true;
    }

    @Override
    protected void onTransform(Component component, float position) {
        float width = (float)component.getWidth();
        float height = (float)component.getHeight();
        float rotation = 18.75F * position;
        component.setPivotX(width * 0.5F);
        component.setPivotY(height);
        component.setRotation(rotation);
    }
}
